<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:fragment="chatroom">
    <!--获取 yml 配置文件的值-->
    <input type="hidden" id="app-id" th:value="${@environment.getProperty('xiao.app_id')}">
    <script>(function (i, s, o, g, r, a, m) {
        i["DaoVoiceObject"] = r;
        i[r] = i[r] || function () {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o), m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        a.charset = "utf-8";
        m.parentNode.insertBefore(a, m)
    })(window, document, "script", ('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/d5259c83.js", "daovoice")
    const appId = document.getElementById("app-id").value;
    daovoice('init', {
        app_id: appId
    });
    daovoice('update');
    </script>
</div>
</html>